﻿using System;
using HslCommunication.BasicFramework;

namespace HslCommunication.Core
{
	/// <summary>
	/// 所有数据转换类的静态辅助方法<br />
	/// Static helper method for all data conversion classes
	/// </summary>
	// Token: 0x02000123 RID: 291
	public static class ByteTransformHelper
	{
		/// <summary>
		/// 结果转换操作的基础方法，需要支持类型，及转换的委托，并捕获转换时的异常方法
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <param name="result">源</param>
		/// <param name="translator">实际转换的委托</param>
		/// <returns>转换结果</returns>
		// Token: 0x060018F4 RID: 6388 RVA: 0x0007E754 File Offset: 0x0007C954
		public static OperateResult<TResult> GetResultFromBytes<TResult>(OperateResult<byte[]> result, Func<byte[], TResult> translator)
		{
			OperateResult<TResult> result2;
			try
			{
				bool isSuccess = result.IsSuccess;
				if (isSuccess)
				{
					result2 = OperateResult.CreateSuccessResult<TResult>(translator(result.Content));
				}
				else
				{
					result2 = OperateResult.CreateFailedResult<TResult>(result);
				}
			}
			catch (Exception ex)
			{
				result2 = new OperateResult<TResult>
				{
					Message = string.Format("{0} {1} : Length({2}) {3}", new object[]
					{
						StringResources.Language.DataTransformError,
						SoftBasic.ByteToHexString(result.Content),
						result.Content.Length,
						ex.Message
					})
				};
			}
			return result2;
		}

		/// <summary>
		/// 结果转换操作的基础方法，需要支持类型，及转换的委托
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <param name="result">源结果</param>
		/// <returns>转换结果</returns>
		// Token: 0x060018F5 RID: 6389 RVA: 0x0007E7F4 File Offset: 0x0007C9F4
		public static OperateResult<TResult> GetResultFromArray<TResult>(OperateResult<TResult[]> result)
		{
			return ByteTransformHelper.GetSuccessResultFromOther<TResult, TResult[]>(result, (TResult[] m) => m[0]);
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容，所转换的规则
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn">输入类型</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans">转换方法，从类型TIn转换拿到TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018F6 RID: 6390 RVA: 0x0007E81C File Offset: 0x0007CA1C
		public static OperateResult<TResult> GetSuccessResultFromOther<TResult, TIn>(OperateResult<TIn> result, Func<TIn, TResult> trans)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				result2 = OperateResult.CreateSuccessResult<TResult>(trans(result.Content));
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TIn">输入类型</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans">转换方法，从类型TIn转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018F7 RID: 6391 RVA: 0x0007E858 File Offset: 0x0007CA58
		public static OperateResult GetResultFromOther<TIn>(OperateResult<TIn> result, Func<TIn, OperateResult> trans)
		{
			bool flag = !result.IsSuccess;
			OperateResult result2;
			if (flag)
			{
				result2 = result;
			}
			else
			{
				result2 = trans(result.Content);
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn">输入类型</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans">转换方法，从类型TIn转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018F8 RID: 6392 RVA: 0x0007E888 File Offset: 0x0007CA88
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn>(OperateResult<TIn> result, Func<TIn, OperateResult<TResult>> trans)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				result2 = trans(result.Content);
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018F9 RID: 6393 RVA: 0x0007E8BC File Offset: 0x0007CABC
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TResult>> trans2)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					result2 = trans2(operateResult.Content);
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FA RID: 6394 RVA: 0x0007E914 File Offset: 0x0007CB14
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TResult>> trans3)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						result2 = trans3(operateResult2.Content);
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FB RID: 6395 RVA: 0x0007E994 File Offset: 0x0007CB94
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TResult>> trans4)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							result2 = trans4(operateResult3.Content);
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FC RID: 6396 RVA: 0x0007EA44 File Offset: 0x0007CC44
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TResult>> trans5)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								result2 = trans5(operateResult4.Content);
							}
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <typeparam name="TIn6">输入类型6</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TIn6的泛型委托</param>
		/// <param name="trans6">转换方法6，从类型TIn6转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FD RID: 6397 RVA: 0x0007EB20 File Offset: 0x0007CD20
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5, TIn6>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TIn6>> trans5, Func<TIn6, OperateResult<TResult>> trans6)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								OperateResult<TIn6> operateResult5 = trans5(operateResult4.Content);
								bool flag6 = !operateResult5.IsSuccess;
								if (flag6)
								{
									result2 = OperateResult.CreateFailedResult<TResult>(operateResult5);
								}
								else
								{
									result2 = trans6(operateResult5.Content);
								}
							}
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <typeparam name="TIn6">输入类型6</typeparam>
		/// <typeparam name="TIn7">输入类型7</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TIn6的泛型委托</param>
		/// <param name="trans6">转换方法6，从类型TIn6转换拿到OperateResult的TIn7的泛型委托</param>
		/// <param name="trans7">转换方法7，从类型TIn7转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FE RID: 6398 RVA: 0x0007EC28 File Offset: 0x0007CE28
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, TIn7>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TIn6>> trans5, Func<TIn6, OperateResult<TIn7>> trans6, Func<TIn7, OperateResult<TResult>> trans7)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								OperateResult<TIn6> operateResult5 = trans5(operateResult4.Content);
								bool flag6 = !operateResult5.IsSuccess;
								if (flag6)
								{
									result2 = OperateResult.CreateFailedResult<TResult>(operateResult5);
								}
								else
								{
									OperateResult<TIn7> operateResult6 = trans6(operateResult5.Content);
									bool flag7 = !operateResult6.IsSuccess;
									if (flag7)
									{
										result2 = OperateResult.CreateFailedResult<TResult>(operateResult6);
									}
									else
									{
										result2 = trans7(operateResult6.Content);
									}
								}
							}
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <typeparam name="TIn6">输入类型6</typeparam>
		/// <typeparam name="TIn7">输入类型7</typeparam>
		/// <typeparam name="TIn8">输入类型8</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TIn6的泛型委托</param>
		/// <param name="trans6">转换方法6，从类型TIn6转换拿到OperateResult的TIn7的泛型委托</param>
		/// <param name="trans7">转换方法7，从类型TIn7转换拿到OperateResult的TIn8的泛型委托</param>
		/// <param name="trans8">转换方法8，从类型TIn8转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x060018FF RID: 6399 RVA: 0x0007ED60 File Offset: 0x0007CF60
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, TIn7, TIn8>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TIn6>> trans5, Func<TIn6, OperateResult<TIn7>> trans6, Func<TIn7, OperateResult<TIn8>> trans7, Func<TIn8, OperateResult<TResult>> trans8)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								OperateResult<TIn6> operateResult5 = trans5(operateResult4.Content);
								bool flag6 = !operateResult5.IsSuccess;
								if (flag6)
								{
									result2 = OperateResult.CreateFailedResult<TResult>(operateResult5);
								}
								else
								{
									OperateResult<TIn7> operateResult6 = trans6(operateResult5.Content);
									bool flag7 = !operateResult6.IsSuccess;
									if (flag7)
									{
										result2 = OperateResult.CreateFailedResult<TResult>(operateResult6);
									}
									else
									{
										OperateResult<TIn8> operateResult7 = trans7(operateResult6.Content);
										bool flag8 = !operateResult7.IsSuccess;
										if (flag8)
										{
											result2 = OperateResult.CreateFailedResult<TResult>(operateResult7);
										}
										else
										{
											result2 = trans8(operateResult7.Content);
										}
									}
								}
							}
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <typeparam name="TIn6">输入类型6</typeparam>
		/// <typeparam name="TIn7">输入类型7</typeparam>
		/// <typeparam name="TIn8">输入类型8</typeparam>
		/// <typeparam name="TIn9">输入类型9</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TIn6的泛型委托</param>
		/// <param name="trans6">转换方法6，从类型TIn6转换拿到OperateResult的TIn7的泛型委托</param>
		/// <param name="trans7">转换方法7，从类型TIn7转换拿到OperateResult的TIn8的泛型委托</param>
		/// <param name="trans8">转换方法8，从类型TIn8转换拿到OperateResult的TIn9的泛型委托</param>
		/// <param name="trans9">转换方法9，从类型TIn9转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x06001900 RID: 6400 RVA: 0x0007EEC4 File Offset: 0x0007D0C4
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, TIn7, TIn8, TIn9>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TIn6>> trans5, Func<TIn6, OperateResult<TIn7>> trans6, Func<TIn7, OperateResult<TIn8>> trans7, Func<TIn8, OperateResult<TIn9>> trans8, Func<TIn9, OperateResult<TResult>> trans9)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								OperateResult<TIn6> operateResult5 = trans5(operateResult4.Content);
								bool flag6 = !operateResult5.IsSuccess;
								if (flag6)
								{
									result2 = OperateResult.CreateFailedResult<TResult>(operateResult5);
								}
								else
								{
									OperateResult<TIn7> operateResult6 = trans6(operateResult5.Content);
									bool flag7 = !operateResult6.IsSuccess;
									if (flag7)
									{
										result2 = OperateResult.CreateFailedResult<TResult>(operateResult6);
									}
									else
									{
										OperateResult<TIn8> operateResult7 = trans7(operateResult6.Content);
										bool flag8 = !operateResult7.IsSuccess;
										if (flag8)
										{
											result2 = OperateResult.CreateFailedResult<TResult>(operateResult7);
										}
										else
										{
											OperateResult<TIn9> operateResult8 = trans8(operateResult7.Content);
											bool flag9 = !operateResult8.IsSuccess;
											if (flag9)
											{
												result2 = OperateResult.CreateFailedResult<TResult>(operateResult8);
											}
											else
											{
												result2 = trans9(operateResult8.Content);
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return result2;
		}

		/// <summary>
		/// 使用指定的转换方法，来获取到实际的结果对象内容
		/// </summary>
		/// <typeparam name="TResult">结果类型</typeparam>
		/// <typeparam name="TIn1">输入类型1</typeparam>
		/// <typeparam name="TIn2">输入类型2</typeparam>
		/// <typeparam name="TIn3">输入类型3</typeparam>
		/// <typeparam name="TIn4">输入类型4</typeparam>
		/// <typeparam name="TIn5">输入类型5</typeparam>
		/// <typeparam name="TIn6">输入类型6</typeparam>
		/// <typeparam name="TIn7">输入类型7</typeparam>
		/// <typeparam name="TIn8">输入类型8</typeparam>
		/// <typeparam name="TIn9">输入类型9</typeparam>
		/// <typeparam name="TIn10">输入类型10</typeparam>
		/// <param name="result">原始的结果对象</param>
		/// <param name="trans1">转换方法1，从类型TIn1转换拿到OperateResult的TIn2的泛型委托</param>
		/// <param name="trans2">转换方法2，从类型TIn2转换拿到OperateResult的TIn3的泛型委托</param>
		/// <param name="trans3">转换方法3，从类型TIn3转换拿到OperateResult的TIn4的泛型委托</param>
		/// <param name="trans4">转换方法4，从类型TIn4转换拿到OperateResult的TIn5的泛型委托</param>
		/// <param name="trans5">转换方法5，从类型TIn5转换拿到OperateResult的TIn6的泛型委托</param>
		/// <param name="trans6">转换方法6，从类型TIn6转换拿到OperateResult的TIn7的泛型委托</param>
		/// <param name="trans7">转换方法7，从类型TIn7转换拿到OperateResult的TIn8的泛型委托</param>
		/// <param name="trans8">转换方法8，从类型TIn8转换拿到OperateResult的TIn9的泛型委托</param>
		/// <param name="trans9">转换方法9，从类型TIn9转换拿到OperateResult的TIn10的泛型委托</param>
		/// <param name="trans10">转换方法10，从类型TIn10转换拿到OperateResult的TResult的泛型委托</param>
		/// <returns>类型为TResult的对象</returns>
		// Token: 0x06001901 RID: 6401 RVA: 0x0007F058 File Offset: 0x0007D258
		public static OperateResult<TResult> GetResultFromOther<TResult, TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, TIn7, TIn8, TIn9, TIn10>(OperateResult<TIn1> result, Func<TIn1, OperateResult<TIn2>> trans1, Func<TIn2, OperateResult<TIn3>> trans2, Func<TIn3, OperateResult<TIn4>> trans3, Func<TIn4, OperateResult<TIn5>> trans4, Func<TIn5, OperateResult<TIn6>> trans5, Func<TIn6, OperateResult<TIn7>> trans6, Func<TIn7, OperateResult<TIn8>> trans7, Func<TIn8, OperateResult<TIn9>> trans8, Func<TIn9, OperateResult<TIn10>> trans9, Func<TIn10, OperateResult<TResult>> trans10)
		{
			bool flag = !result.IsSuccess;
			OperateResult<TResult> result2;
			if (flag)
			{
				result2 = OperateResult.CreateFailedResult<TResult>(result);
			}
			else
			{
				OperateResult<TIn2> operateResult = trans1(result.Content);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result2 = OperateResult.CreateFailedResult<TResult>(operateResult);
				}
				else
				{
					OperateResult<TIn3> operateResult2 = trans2(operateResult.Content);
					bool flag3 = !operateResult2.IsSuccess;
					if (flag3)
					{
						result2 = OperateResult.CreateFailedResult<TResult>(operateResult2);
					}
					else
					{
						OperateResult<TIn4> operateResult3 = trans3(operateResult2.Content);
						bool flag4 = !operateResult3.IsSuccess;
						if (flag4)
						{
							result2 = OperateResult.CreateFailedResult<TResult>(operateResult3);
						}
						else
						{
							OperateResult<TIn5> operateResult4 = trans4(operateResult3.Content);
							bool flag5 = !operateResult4.IsSuccess;
							if (flag5)
							{
								result2 = OperateResult.CreateFailedResult<TResult>(operateResult4);
							}
							else
							{
								OperateResult<TIn6> operateResult5 = trans5(operateResult4.Content);
								bool flag6 = !operateResult5.IsSuccess;
								if (flag6)
								{
									result2 = OperateResult.CreateFailedResult<TResult>(operateResult5);
								}
								else
								{
									OperateResult<TIn7> operateResult6 = trans6(operateResult5.Content);
									bool flag7 = !operateResult6.IsSuccess;
									if (flag7)
									{
										result2 = OperateResult.CreateFailedResult<TResult>(operateResult6);
									}
									else
									{
										OperateResult<TIn8> operateResult7 = trans7(operateResult6.Content);
										bool flag8 = !operateResult7.IsSuccess;
										if (flag8)
										{
											result2 = OperateResult.CreateFailedResult<TResult>(operateResult7);
										}
										else
										{
											OperateResult<TIn9> operateResult8 = trans8(operateResult7.Content);
											bool flag9 = !operateResult8.IsSuccess;
											if (flag9)
											{
												result2 = OperateResult.CreateFailedResult<TResult>(operateResult8);
											}
											else
											{
												OperateResult<TIn10> operateResult9 = trans9(operateResult8.Content);
												bool flag10 = !result.IsSuccess;
												if (flag10)
												{
													result2 = OperateResult.CreateFailedResult<TResult>(operateResult9);
												}
												else
												{
													result2 = trans10(operateResult9.Content);
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			return result2;
		}
	}
}
